using BootstrapBlazorApp.Server.LLMs.function;
using BootstrapBlazorApp.Server.LLMs.messages;
using Newtonsoft.Json;

namespace BootstrapBlazorApp.Server.LLMs.model.TongYi;

public class TongYiInput
{
    public required string? Model { get; set; }

    public MessageInput Input { get; } = new();
    
    public MessageParameters Parameters { get; } = new();

    public class MessageInput
    {
        public List<ReturnMessage> Messages { get; set; } = [];

    }
    
    public class MessageParameters
    {
        [JsonProperty("incremental_output")]
        public bool IncrementalOutput { get; set; }
        [JsonProperty("result_format")]
        public string ResultFormat { get; set; } = "message";
        [JsonProperty("tools", NullValueHandling = NullValueHandling.Ignore)]
        public List<FunctionInput>? Tools { get; set; }
    }

}